<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="Tronke.Ajax.js"></script>
    <style>
        table,th,td{
            text-align:center;
            border:1px solid #ccc;
        }
    </style>
</head>
<body>
<table cellpadding="0" cellspacing="0">
    <thead>
        <th>序号</th>
        <th>用户名</th>
        <th>密码</th>
        <th>真实姓名</th>
        <th>地址</th>
        <th>QQ</th>
        <th>电话</th>
        <th>年纪</th>
    </thead>
    <tbody id="body">

    </tbody>
</table>
<select id="sel">
    <option >1</option>
    <option >2</option>
    <option >3</option>
    <option >4</option>
</select>
</body>
</html>
<script>
    //    post
    //    http://10.36.132.104/userinfo/getlist
    //        page  第几页
    //    pageSize 每一页显示多少条数据
    //
    //    返回的结果：
    //    { Rows：tempData, Total ： listUser.Count }
    var obody = document.getElementById('body');
    ajax({
        url : "http://10.36.132.104/userinfo/getlist",
        type : "post",
        async:"true",
        data : {
            "page":1,
            "pageSize":20
        },
        dataType : "json",
        success : function(result){
            console.log(result);
            var arr = result.Rows;
            for(var i = 0, len = arr.length; i < len; i++){
                console.log(arr.length);
                var newtr = document.createElement("tr");
                obody.appendChild(newtr);
                for(var key in arr[i]){
                    var newtd = document.createElement("td");
                    newtd.innerHTML = arr[i][key];
                    newtr.appendChild(newtd);
                }
            }
        }
    });


</script>